package com.qf.common.dto;

import com.qf.common.canstant.OrderConstants;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;

/**
 * @author KING
 * @ClassName: com.qf.common.dto.OrderRequestParams
 * @Description: 该类的功能描述
 * @date: 2021/10/28 9:55
 */
@Data
public class OrderDto {

    public interface FindOrder {

    }

    public interface SearchOrder {

    }

    /**
     * 店铺ID
     */
    @NotNull(groups = {FindOrder.class, SearchOrder.class}, message = OrderConstants.RegexpMsg.MSG_STORE_N)
    private Long storeId;

    /**
     * 订单编号
     */
    @Pattern(groups = SearchOrder.class,
            regexp = OrderConstants.Regexp.REGEXP_ORDER_NO, message = OrderConstants.RegexpMsg.MSG_ORDER_NO)
    private String orderNo;

    /**
     * 收货人姓名
     */
    private String receivingName;

    /**
     * 收货人电话
     */
    @Pattern(groups = SearchOrder.class,
            regexp = OrderConstants.Regexp.REGEXP_PHONE, message = OrderConstants.RegexpMsg.MSG_PHONE)
    private String receivingPhone;

    /**
     * 普通订单1，预售订单2，拼团订单3
     */
    private Integer orderType;

    /**
     * 支付时间
     */
    private Date paymentTime;

    /**
     * 商品标题
     */
    private String productName;

    private Integer page;

    private Integer size;

}
